// pages/detail/detail.js
const app = getApp()
Page({

  data: {
    info:{}
  },

  onLoad(opts) {
    wx.showLoading({
      title: '加载中...',
    })
    let solve_id = opts.id
    let access_token = wx.getStorageSync('access_token')
    wx.request({
      url: 'https://baokang.wshoto.com/wx/solvedetail',
      data: {
        access_token: access_token,
        solve_id:solve_id
      },
      success: (res) => {
        console.log(res)
        if(res.data.code >= 500){
          app.getLogin().then(function(){
            console.log('二次登录。。。')
          })
        }
        else if (res.data.code == 1) {
          this.setData({
            info:res.data.info,
            list:res.data.info.house_list
          })
        }
        console.log(this.data.list)
      },
      complete:(res)=>{
        wx.hideLoading()
      }
    })
  }




})